<?php


namespace catchAdmin\ca\validate;


use think\Validate;

class LoginValidate extends Validate
{
    protected $rule = [
        'ticket|票据' => [
            'requireWithout:username',
            'requireWithout:password',
        ],
        'username|用户名' => [
            'requireWithout:ticket',
        ],
        'password|密码' => [
            'requireWithout:ticket'
        ],
        'platform|登录平台' => [
            'require',
            'in:1,2'
        ]
    ];

    protected $scene = [
        "login" => ["ticket", "username", "password", "platform"]
    ];
}